import { defineStore } from 'pinia'
import {ref} from 'vue'


export const useAgentStore = defineStore('agent', ()=>{
    const agent = ref();
    if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){
        agent.value = 'phone'
    }else{
        agent.value = 'pc'
    }

    return agent
})